#导入Base
import time

from Base.Base import Base
from selenium.webdriver.common.by import By
class Page(Base):
    #点击登录，定位
    login_loc=(By.LINK_TEXT,'登录')
    #调用点击
    def Click(self):
        self.dianji_click(self.login_loc)

    user_loc=(By.NAME,'username')
    #点击用户名
    def Username(self):
        self.send_keys(self.user_loc,'liu121212')

    password_loc = (By.NAME, 'password')
    # 点击密码
    def Password(self) :
        self.send_keys(self.password_loc, '121212')

    #点击登录
    denglu_loc=(By.XPATH,'//*[@id="theForm"]/div[5]/a')
    def Denglu(self):
        self.dianji_click(self.denglu_loc)

    def A3mall_login_01(self):
        self.open_url('http://10.59.9.12:7001/')
        self.Click()
        self.Username()
        self.Password()
        #输入验证码时间
        time.sleep(6)
        self.Denglu()

